package com.guyu.plugin.excel.exception;

import com.guyu.common.core.exception.BizException;
import com.guyu.common.core.exception.code.ErrorCodeEnum;
import lombok.EqualsAndHashCode;

import java.io.Serial;


@EqualsAndHashCode(callSuper = true)
public class ExcelException extends BizException {

    @Serial
    private static final long serialVersionUID = 1L;

    public ExcelException(String message) {
        super(ErrorCodeEnum.SYSTEM_ERROR.getCode(), message, "excel");
    }

    public ExcelException(String message, Throwable e) {
        super(ErrorCodeEnum.SYSTEM_ERROR.getCode(), message, "excel", e);
    }

    public ExcelException(Throwable e) {
        this(e.getMessage(), e);
    }
}
